import axios from 'axios';

export function request(){
  const instance = axios.create({
    baseURL:'http://timemeetyou.com:8889/api/private/v1/',
    timeout:5000
  });
  
  //请求拦截
  instance.interceptors.request.use(config =>{
    config.headers.Authorization = window.sessionStorage.getItem('token');
    return config;
  });
  //响应拦截
  instance.interceptors.response.use(res =>{
    return res;
  });

  //发起网络请求
  return instance;
}


